
import React, { Component } from 'react';
import { Actions } from 'react-native-router-flux'
import {
  StyleSheet,
  View,
  Text,
  FlatList,
} from 'react-native';
import List from './table'

export default class App extends Component<{}> {

  componentWillMount(){
    const { query } = this.props
    query()
  }

  render() {

    const { list,count,page, queryDetail ,setProjectId ,selectRowData,thisTextChange,prjname,search} = this.props

    return (
      <View style={styles.container}>
        <FlatList
          data={[
            {key: 0, title: 'Table'}
          ]}
          renderItem={({item}) => <List query={queryDetail} list={list} selectRowData={selectRowData} thisTextChange={thisTextChange}
                                              page={page} prjname={prjname} {...item} setProjectId={setProjectId} search={search} count={count}/>}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: 22
  },
  item: {
    padding: 10,
    fontSize: 18,
    height: 4400,
  },
});